
public class Pet {
	private String name;
	private String type;
	private String color;
	private int calories;
	Pet(){
		setName("Spikes");
		type = "Dog";
		color = "Black";
		calories = 3000;
	}
	Pet(String n){
		name = n;
		type = "dog";
		color = "black";
		calories = 3000;
		
	}
	Pet (String n, String t, String c){
		name = n;
		type = t;
		color = c;
		calories = 3000;
	}
	//Setter for name
	 void setName(String n) {
		 if (n.length() <= 6)
			 name = n;
		 else
			 name = n.substring(0,5);
	 }//end setter
	 //Getter for name
	 String getName(){
		 return name;
	 }//end getter
	 //Setter for type
	 void settype(String t) {
		 if (t.length() <=6)
			 type = t;
		 else
			 type = t.substring(0,5);
	 }//end setter
	 //Getter for type
	 String getType(){
		 return type;
	 }//end getter
	 //Setter for color
	 void setcolor(String c) {
		 if (c.length() <=6)
			 color = c;
			 else
				 color = c.substring(0,5);
	 }
	public String getColor() {
		// TODO Auto-generated method stub
		return null; }
		//Getter for calories
		int getCalories() {
			return calories;
		}
		//Setter for calories
		void setCalories(int a){
			if (calories < 8000);
			calories = a;
	}
		//class methods
		public void run(){
			calories = calories - 50;
		}//end run
		public void eat(int a){
			setCalories(calories + a);
		}//end class
	
	}
		
	}


